Skip to content

[0-size Tensor No.75] Add 0-size Tensor support for hstack - #72996

Merged
wanghuancoder merged 5 commits into
PaddlePaddle:developfrom
enkilee:0size-75-hstack
Jun 10, 2025
Merged

wanghuancoder merged 5 commits into
PaddlePaddle:developfrom
enkilee:0size-75-hstack

Conversation

@enkilee

@enkilee enkilee commented May 29, 2025

Copy link
Copy Markdown
Collaborator

PR Category

Execute Infrastructure

PR Types

Improvements

Description

当前PR为增加单测
develop代码测试cpu和gpu没问题:

aistudio@jupyter-115720-9209764:~/PaddleAPITest$ python engineV2.py --api_config='paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )' --paddle_only=True --test_cpu=True
Main process id: 5178
Options: {'api_config_file': '', 'api_config_file_pattern': '', 'api_config': 'paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )', 'paddle_only': 'True', 'paddle_cinn': False, 'accuracy': False, 'test_amp': False, 'num_gpus': 0, 'num_workers_per_gpu': 1, 'gpu_ids': '', 'required_memory': 10.0, 'test_cpu': True, 'use_cached_numpy': False, 'log_dir': ''}
Test begin: paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
W0529 02:26:20.905910  5178 gpu_resources.cc:114] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
[Pass] paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
Done.

aistudio@jupyter-115720-9209764:~/PaddleAPITest$ python engineV2.py --api_config='paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )' --paddle_only=True
Main process id: 5407
Options: {'api_config_file': '', 'api_config_file_pattern': '', 'api_config': 'paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )', 'paddle_only': 'True', 'paddle_cinn': False, 'accuracy': False, 'test_amp': False, 'num_gpus': 0, 'num_workers_per_gpu': 1, 'gpu_ids': '', 'required_memory': 10.0, 'test_cpu': False, 'use_cached_numpy': False, 'log_dir': ''}
Test begin: paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
W0529 02:27:13.070490  5407 gpu_resources.cc:114] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
[Pass] paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
Done.

@paddle-bot

paddle-bot Bot commented May 29, 2025

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot Bot added the contributor External developers label May 29, 2025
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label May 29, 2025
@enkilee enkilee changed the title [0-size Tensor No.75] Add 0-size Tensor support for log [0-size Tensor No.75] Add 0-size Tensor support for hstack May 29, 2025
d0 = generate_data([], count=1, dtype='float64')
d1 = generate_data([1], count=1, dtype='float64')
self._test_all(rearrange_data(d0, d1))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个测试的case都是有关于0-dim的,请补充几个0-size的单测,比如shape为[5,0] 、[0,5]这种

@enkilee

enkilee commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator Author

/re-run all-failed

1 similar comment
@enkilee

enkilee commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator Author

/re-run all-failed

@DanielSun11 DanielSun11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder
wanghuancoder merged commit cd4c585 into PaddlePaddle:develop Jun 10, 2025
shanjiang7 pushed a commit to shanjiang7/Paddle that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants